package org.chen.service.Impl;

import org.chen.service.PayMethod;
import org.chen.service.PaymentService;

/**
 * @Author czl
 * @Date 2024-04-30
 */
public class AlipayService implements PaymentService {
    @Override
    public String getServiceName() {
        return "Alipay";
    }

    @Override
    public void pay(float amount) {
        System.out.println("支付方式：" + this.getServiceName() + "，支付金额：" + amount);
    }

    @Override
    public float getHandlingFee(float amount) {
        return amount * PayMethod.AliPay.getPercentage();
    }
}
